
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

<title>Round Fan</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="docs.css">
</head>
<body>
<div class="container-fluid">
  <script src="menu.js"></script>
  <div class="content p-3">
    <div class="container-fluid">
      <h2>Round Fan</h2>
      <hr>
      <canvas id="round-fan" width="200" height="200"></canvas>

      <h5 class="mt-3">Html</h5>
  <pre><code><!-- Default view dimension 200 x 200 -->
<canvas id="round-fan" width="200" height="200"></canvas></code></pre>

      <h5>JavaScript</h5>
<pre><code>/* Options */
var options = {
  // Fan color.
  fanColor: '#00d7af',
  center: {
    // The center circle color.
    color: '#00d7af',
    // The center circle 2 color.
    bgColor: '#FFFFFF'
  },
  // Fan speed. The larger, the faster.
  speed: 1
}
/* Constructor */
var roundFan = new zeu.RoundFan('round-fan', options);

/* Setter */
roundFan.speed = 2;
roundFan.fanColor = '#00d7af';
roundFan.centerColor = '#00d7af';
roundFan.centerBgColor = '#FFFFFF';</code></pre>

    <h4>More examples</h4>
    <p>
      Change speed on the fly.
    </p>
    <canvas id="round-fan-2" width="200" height="200"></canvas>
    </div>
  </div>
</div>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/styles/github.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.4.0/highlight.min.js"></script>
<script src="docs.js"></script>
<script src="../dist/zeu.js"></script>
<script type="text/javascript">
/* Options */
var options = {
  // Fan color.
  fanColor: '#00d7af',
  center: {
    // The center circle color.
    color: '#00d7af',
    // The center circle 2 color.
    bgColor: '#FFFFFF'
  },
  // Fan speed. The larger, the faster.
  speed: 1
}
/* Constructor */
var roundFan = new zeu.RoundFan('round-fan', options);
    
/* Setter */
roundFan.speed = 2;
roundFan.fanColor = '#00d7af';
roundFan.centerColor = '#00d7af';
roundFan.centerBgColor = '#FFFFFF';

var roundFan2 = new zeu.RoundFan('round-fan-2', {
  fanColor: COLOR.blue,
  center: {
    color: COLOR.white,
    bgColor: COLOR.blue
  },
});
    
setInterval(function() {
  roundFan2.speed = getRandomInt(1, 10);
}, 3000);

</script>
</body>
</html>

